package org.adorsys.aderp.cash.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.entity.RooJpaEntity;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaEntity
public class CashRegister implements Serializable{

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@NotNull
    @Column(name = "cashRegisterKeyBk", unique = true)
    private String cashRegisterKey;

    @NotNull
    private String tite;

    private String description;

    @NotNull
    private BigDecimal cashBalance;

    @ManyToMany(cascade = CascadeType.ALL,fetch=FetchType.EAGER)
    private Set<Device> devices = new HashSet<Device>();

    private String recordOwner;
}
